package com.yuanfeng.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanfeng.base.dto.CommissionSettingVO;
import com.yuanfeng.base.entity.BaseVkSetEntity;
import com.yuanfeng.commoms.vo.fx.GoodsVkSetVO;
import com.yuanfeng.commoms.vo.order.OrderCommissionVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @ClassName BaseVkSetMapper
 * @Description  微客配置表
 * @Author cyp
 * @Date 2023-06-05 10:48:39
 * @Version 1.0
 **/
@Mapper
public interface BaseVkSetMapper extends BaseMapper<BaseVkSetEntity> {

     /**
      * 查询微客配置
      * @param vkSetId
      * @return
      */
     GoodsVkSetVO selectByPrimaryKey(Integer vkSetId);


    /**
     *插入分佣设置
     */
    Integer insertCommissionSetting(@Param("param") CommissionSettingVO param);

    /**
     * 修改分佣设置
     */
    Integer updateCommissionSetting(@Param("param") CommissionSettingVO param);

    /**
     * 查询佣金订单
     * @param orderId
     * @return
     */
    OrderCommissionVO selectOrderCommission(@Param("orderId") String orderId);

    /**
     * 分佣订单售后时间更新
     * @param orderId
     * @param afterDate
     */
    void updateOrderAfterSaleTime(@Param("orderId") String orderId, @Param("returnTime") String afterDate);
}
